import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:get/get.dart';
import 'package:wallet_utils/color.dart';
import 'package:wallet_utils/ht_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wallet_utils/text_style.dart';
import 'logic.dart';

class AboutUsPage extends StatelessWidget {
  final logic = Get.put(AboutUsLogic());
  final state = Get.find<AboutUsLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ColorManager.colorF4F5F6,
      appBar: htCommonAppbar(context, title: '关于我们'),
      body: Container(
        alignment: Alignment.center,
        child: Column(
          children: [
            SizedBox(
              height: 30.w,
            ),
            Image.asset(
              'images/logo.png',
              width: 70.w,
              height: 70.w,
            ),
            SizedBox(
              height: 15.w,
            ),
            Text(
              '放鑫钱包',
              style: TextStyleUtils.style000000(fontSize: 16.sp),
            ),
            Container(
              width: double.infinity,
              margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 30.w),
              padding: EdgeInsets.all(15.w),
              decoration: BoxDecoration(
                color: ColorManager.colorFFFFFF,
                //设置四周圆角 角度 这里的角度应该为 父Container height 的一半
                borderRadius: BorderRadius.all(Radius.circular(5.w)),
              ),
              child: GetBuilder<AboutUsLogic>(builder: (logic) {
                return Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      state.name ?? '',
                      style: TextStyleUtils.style000000(fontSize: 18.sp, fontWeight: FontWeight.bold),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: 10.w),
                      child: HtmlWidget(
                        state.content ?? '',
                        textStyle: TextStyleUtils.style999999(fontSize: 13.sp),
                      ),
                    )
                  ],
                );
              }),
            )
          ],
        ),
      ),
    );
  }
}
